import 'dart:io';

//import 'package:file_picker/file_picker.dart';
import 'package:permission_handler/permission_handler.dart';

Future<bool> checkStoragePermission() async {
  if (Platform.isAndroid) {
    var storge = await Permission.storage.isGranted;
    if (!storge) {
      var status = await Permission.storage.request();
      if (status.isDenied) {
        return false;
      }
    }
  }
  return true;
}

// Future<String> getStringFromFile() async {
//   var ret = '[]';
//   FilePickerResult? result = await FilePicker.platform.pickFiles();

//   if (result != null) {
//     File file1 = File(result.files.single.path!);
//     try {
//       ret = await file1.readAsString();
//     } catch (e) {
//       ret = '[]';
//     }
//   }
//   return ret;
// }